﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace MiniBotAlgorithmLibSample
{
    /// <summary>
    /// 遥控小车、蛇、双足、双轮、攀爬、仿生蜘蛛、X轮式
    /// </summary>
    public enum RobotTypeEnum
    {
        Car = 1,
        Snake = 2,
        Bipe = 3,
        Climber = 4,
        Spider = 5,
        XWheel = 6
    }


    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void SetPositionCallback(byte id, double angle);

    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void SetPositionWithSpeedCallback(byte id, double angle, int speedPercent);


    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void SetMultiPositionCallback(IntPtr ids, IntPtr angles, int count);


    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void SetMultiPositionWithSpeed(IntPtr pids, IntPtr pangles, int count, int speedPercent);

    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void SetSpeedCallback(byte id, int speedPercent);

    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void SetRunningSpeedCallback(byte id, int speedPercent);

    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void SetTorqueEnableCallback(byte id, bool isEnable);

    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
    public delegate void SetModeCallback(byte id, int mode);
}
